package com.base.project.exception;

import java.text.MessageFormat;

/**
 * @ProjectName: airline
 * @Package: com.ticket.airline.exception
 * @Description:
 * @Author: Z.G.C
 * @CreateDate: 2019/9/27 5:38 PM
 * @UpdateUser: Z.G.C
 * @UpdateDate: 2019/9/27 5:38 PM
 * @UpdateRemark: The modified content
 * @Version: 1.0
 * <p>Copyright: Copyright (c) 2019</p>
 */
public class BaseException extends RuntimeException {
    protected String msg;
    protected String code;

    protected BaseException(String message) {
        super(message);
    }

    protected BaseException(String code, String msgFormat, Object... args) {
        super(MessageFormat.format(msgFormat, args));
        this.code = code;
        this.msg = MessageFormat.format(msgFormat, args);
    }

    public String getMsg() {
        return this.msg;
    }

    public String getCode() {
        return this.code;
    }
}
